/PROG  PNS0044
/ATTR
OWNER		= MNEDITOR;
COMMENT		= "825B-1232";
PROG_SIZE	= 3619;
CREATE		= DATE 24-10-27  TIME 08:45:04;
MODIFIED	= DATE 25-04-29  TIME 18:44:30;
FILE_NAME	= PNS0043;
VERSION		= 0;
LINE_COUNT	= 124;
MEMORY_SIZE	= 4067;
PROTECT		= READ_WRITE;
TCD:  STACK_SIZE	= 0,
      TASK_PRIORITY	= 50,
      TIME_SLICE	= 0,
      BUSY_LAMP_OFF	= 0,
      ABORT_REQUEST	= 0,
      PAUSE_REQUEST	= 0;
DEFAULT_GROUP	= 1,*,*,*,*;
CONTROL_CODE	= 00000000 00000000;
/APPL
/MN
   1:  !******************************** ;
   2:  !     COSMA METAL FORMING  ;
   3:  !******************************** ;
   4:  !  LINE: CHINA CHANGSHA ;
   5:  !  ROBOT: R45 ;
   6:  !  PROGRAM: PNS0057 ;
   7:  !  PART:1311 ;
   8:  !HL2015-8-17********************* ;
   9:  !INITIALIZE ;
  10:  MOVE TO HOME    ;
  11:  R[14:CG SENSETIVE]=90    ;
  12:  R[18:PICK TIME BEFORE]=1    ;
  13:  R[19:DROP TIME BEFORE]=.2    ;
  14:   ;
  15:  !------------------------------- ;
  16:  !BEGINNING OF PROGRAM ;
  17:  CALL PARTDROP    ;
  18:  COL GUARD ADJUST R[14] ;
  19:  UTOOL_NUM=1 ;
  20:  UFRAME_NUM=0 ;
  21:  PAYLOAD[3] ;
  22:  R[5:SPEED/SuDu]=10    ;
  23:  OVERRIDE=R[5:SPEED/SuDu] ;
  24:  !INITIATE TO PICK-POUNCE ;
  25:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  26:J P[2:PICK POUNCE] 100% CNT100 ACC70    ;
  27:  PAUSE ;
  28:  R[1:CYCLE TOTAL]=0    ;
  29:  TIMER[1]=RESET ;
  30:  TIMER[1]=START ;
  31:   ;
  32:  LBL[10:TOP OF LOOF] ;
  33:  OVERRIDE=R[5:SPEED/SuDu] ;
  34:   ;
  35:  TIMER[3]=STOP ;
  36:  TIMER[2]=STOP ;
  37:  R[1:CYCLE TOTAL]=R[1:CYCLE TOTAL]+1    ;
  38:  R[2:LAST CYCLE TIME]=TIMER[2]    ;
  39:  R[3:LAST SPM]=60/R[2:LAST CYCLE TIME]    ;
  40:  R[8:R MOVE TIME]=TIMER[3]    ;
  41:  TIMER[2]=RESET ;
  42:  TIMER[2]=START ;
  43:  TIMER[3]=RESET ;
  44:   ;
  45:  !PROCEED TO PICK ;
  46:  LBL[20] ;
  47:  IF DI[1:P4 PICK ENTRY OK]=ON AND DI[3:FROM R34 CLEAR]=ON AND DI[8:P4 PICK START]=ON,JMP LBL[25] ;
  48:  IF DI[29:CYCLE STOP]=ON,JMP LBL[90] ;
  49:  JMP LBL[20] ;
  50:   ;
  51:  LBL[25] ;
  52:  WAIT DI[1:P4 PICK ENTRY OK]=ON AND DI[3:FROM R34 CLEAR]=ON AND DI[8:P4 PICK START]=ON    ;
  53:  R[5:SPEED/SuDu]=100    ;
  54:  TIMER[3]=START ;
  55:  OVERRIDE=R[5:SPEED/SuDu] ;
  56:J P[3:PICK APPROACH] 100% CNT55 ACC100    ;
  57:   ;
  58:J P[4:PICK] 100% CNT0 TB R[18]sec,CALL PARTPICK ACC100 BREAK    ;
  59:  PAYLOAD[4] ;
  60:  CALL CHK_PICK    ;
  61:  MONITOR Z_CHECH ;
  62:J P[5:PICK DEPART] 100% CNT70 ACC100 TA R[20]sec,DO[5:TO R34 DROP START]=PULSE,1.0sec    ;
  63:  DO[8:P4 PARTS OUT]=PULSE,1.0sec ;
  64:  LBL[27] ;
  65:  CALL CHECKPICK    ;
  66:  IF DI[9:VACUUM ONL]=OFF OR DI[11:VACUUM ONR]=OFF,JMP LBL[27] ;
  67:  //L P[6:PICK SNEAK] 3000mm/sec CNT100 TA R[20]sec,DO[5:TO R34 DROP START]=PULSE,1.0sec    ;
  68:J P[7:PICK CLEAR] 100% CNT100 ACC100    ;
  69:  LBL[30:GOTO DROP POUNCE] ;
  70:J P[8:DROP POUNCE] 100% CNT100 ACC100    ;
  71:  OVERRIDE=R[5:SPEED/SuDu] ;
  72:  TIMER[3]=STOP ;
  73:  LBL[40:AT DROP POUNCE] ;
  74:  IF DI[2:P5 DROP ENTRY]=ON AND DI[4:FROM RU5 CLEAR]=ON AND DI[5:P5 DROP START]=ON,JMP LBL[80] ;
  75:  IF DI[7:PRESS STAMPING COMPLETE]=ON AND DI[2:P5 DROP ENTRY]=ON,JMP LBL[50] ;
  76:   ;
  77:  IF DI[18:MOVE TO CLEAR POS]=ON,JMP LBL[60] ;
  78:  JMP LBL[40] ;
  79:   ;
  80:  LBL[50:MOVE DROP SNEAK] ;
  81:  TIMER[3]=START ;
  82:  OVERRIDE=R[5:SPEED/SuDu] ;
  83:J P[9:DROP SNEAK] 100% CNT100 ACC100    ;
  84:  LBL[51:DROP OR C-P-S] ;
  85:  IF DI[2:P5 DROP ENTRY]=ON AND DI[4:FROM RU5 CLEAR]=ON AND DI[5:P5 DROP START]=ON,JMP LBL[80] ;
  86:   ;
  87:  IF DI[18:MOVE TO CLEAR POS]=ON,JMP LBL[40] ;
  88:  JMP LBL[51] ;
  89:  JMP LBL[50] ;
  90:   ;
  91:  LBL[60:MOVE CLS-PRS-ACC] ;
  92:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  93:  PAUSE ;
  94:  JMP LBL[30] ;
  95:   ;
  96:  LBL[80:DROP ENABLED] ;
  97:  TIMER[3]=START ;
  98:  !PROCEED TO DROP ;
  99:  OVERRIDE=R[5:SPEED/SuDu] ;
 100:  //J P[16:NEAK] 80% CNT80    ;
 101:  //L P[14:DROP LIMIT] 3000mm/sec CNT80 ACC100    ;
 102:J P[10:DROP APPROACH] 100% CNT50 ACC100    ;
 103:  MONITOR END Z_CHECH ;
 104:J P[11:DROP] 100% CNT5 TB R[19]sec,CALL PARTDROP ACC100    ;
 105:  DO[6:PART DROP COMPLETE]=PULSE,1.0sec ;
 106:   ;
 107:  PAYLOAD[3] ;
 108:   ;
 109:J P[12:DROP DEPART] 100% CNT100 ACC130 TA   0.00sec,DO[7:PRESS STAMPING START]=PULSE,1.0sec    ;
 110:  CALL CHK_DROP    ;
 111:J P[13:DROP CLEAR] 100% CNT100 ACC130    ;
 112:  !GOTO PICK POUNCE ;
 113:J P[2:PICK POUNCE] 100% CNT100 ACC100 BREAK    ;
 114:  IF DI[29:CYCLE STOP]=ON,JMP LBL[90] ;
 115:  JMP LBL[10] ;
 116:   ;
 117:  LBL[90:END OF CYCLE] ;
 118:  TIMER[1]=STOP ;
 119:  R[4:TOTAL CYCLE TIME]=TIMER[1]    ;
 120:  MONITOR END MON_PICK ;
 121:J P[1:MIDDLE] 50% CNT100    ;
 122:  MOVE TO HOME    ;
 123:   ;
 124:  LBL[100:END OF PROGRAM] ;
/POS
P[1:"MIDDLE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2086.456  mm,	Y =     -.007  mm,	Z = -1008.000  mm,
	W =  -180.000 deg,	P =     -.000 deg,	R =  -180.000 deg,
	E1=   107.700 deg
};
P[2:"PICK POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2638.367  mm,	Y =  1319.034  mm,	Z =  -947.458  mm,
	W =   179.416 deg,	P =     1.435 deg,	R =   119.446 deg,
	E1=   104.964 deg
};
P[3:"PICK APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2603.594  mm,	Y =  3216.335  mm,	Z = -1072.789  mm,
	W =   179.180 deg,	P =    -1.273 deg,	R =    91.311 deg,
	E1=   104.969 deg
};
P[4:"PICK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2603.593  mm,	Y =  3216.335  mm,	Z = -1195.188  mm,
	W =   179.180 deg,	P =    -1.273 deg,	R =    91.311 deg,
	E1=   104.969 deg
};
P[5:"PICK DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2603.594  mm,	Y =  3216.334  mm,	Z = -1019.589  mm,
	W =   179.180 deg,	P =    -1.273 deg,	R =    91.311 deg,
	E1=   104.969 deg
};
P[6:"PICK SNEAK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2702.785  mm,	Y =  2009.344  mm,	Z =  -882.361  mm,
	W =  -178.452 deg,	P =     1.395 deg,	R =    91.368 deg,
	E1=   104.964 deg
};
P[7:"PICK CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2168.141  mm,	Y =  1252.795  mm,	Z =  -897.125  mm,
	W =  -179.004 deg,	P =      .529 deg,	R =   130.985 deg,
	E1=   104.142 deg
};
P[8:"DROP POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  1869.899  mm,	Y =  -394.171  mm,	Z =  -929.255  mm,
	W =  -179.200 deg,	P =      .178 deg,	R =   177.056 deg,
	E1=   106.200 deg
};
P[9:"DROP SNEAK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2629.666  mm,	Y = -1554.441  mm,	Z = -1001.520  mm,
	W =  -178.070 deg,	P =     -.491 deg,	R =  -100.004 deg,
	E1=   111.615 deg
};
P[10:"DROP APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2745.542  mm,	Y = -3220.955  mm,	Z =  -998.297  mm,
	W =  -178.658 deg,	P =    -1.078 deg,	R =   -93.893 deg,
	E1=   110.172 deg
};
P[11:"DROP"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2745.539  mm,	Y = -3220.955  mm,	Z = -1152.375  mm,
	W =  -178.658 deg,	P =    -1.078 deg,	R =   -93.894 deg,
	E1=   110.172 deg
};
P[12:"DROP DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2745.543  mm,	Y = -3220.955  mm,	Z = -1014.377  mm,
	W =  -178.658 deg,	P =    -1.078 deg,	R =   -93.893 deg,
	E1=   110.172 deg
};
P[13:"DROP CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  1978.784  mm,	Y = -1250.885  mm,	Z =  -919.984  mm,
	W =   179.438 deg,	P =     1.059 deg,	R =  -150.867 deg,
	E1=   106.295 deg
};
P[14:"DROP LIMIT"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2611.198  mm,	Y = -2501.097  mm,	Z =  -959.344  mm,
	W =   179.016 deg,	P =      .978 deg,	R =   -90.513 deg,
	E1=   106.960 deg
};
P[16:"NEAK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2547.260  mm,	Y = -1827.900  mm,	Z =  -957.612  mm,
	W =  -178.101 deg,	P =      .998 deg,	R =  -114.461 deg,
	E1=   141.029 deg
};
/END
